<template>
    <div class="pageHeader">
        <span @click="$router.back()" class="iconfont icon-icon-test" v-if="showBack"></span>
        <slot></slot>
    </div>
</template>

<script>
export default {
    name:"pageHeader",
    props:{
        showBack:{
            type:Boolean,
            default:false
        }
    }
}
</script>

<style lang="scss" scoped>
@import "../assets/css/comm.scss";
.pageHeader{
    width:100%;
    height:.9rem;
    background-color:$primaryColor;
    @include flexbox();
    justify-content: center;
    align-items: center;
    color: #ffffff;
    position: relative;
    >.iconfont{
        position: absolute;
        left:10px;
    }
}
</style>
